package org.jix.framework.common.validator;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author stark
 * @date 2025/5/12 15:00
 * @description
 **/
@Target({ElementType.METHOD,ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = PhoneNumberValidator.class)
public @interface PhoneNumber {

    String message() default  "这是手机号？没见过这种，这里只认 11 位数字的手机号";

    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
}
